﻿
using AutoMapper;
using BCDto.TMS.KanBan.AgentKanBan;
using BCDto.TMS.Order;
using BCDto.TMS.Order.Order;
using BCDto.TMS.Order.OrderAssignRecord;
using BCDto.TMS.Order.OrderCancelRecord;
using BCDto.TMS.Order.OrderEvaluation;
using BCDto.TMS.Order.OrderExtention;
using BCDto.TMS.Order.OrderMoveHouseSpecificationServiceRecord;
using BCDto.TMS.Order.OrderPool;
using BCDto.TMS.OrderExtentionGoodsChecklist;
using BCDto.TMS.OrderFreightAppendRecord;
using BCDto.TMS.OrderFreightFormulaRecord;
using BCDto.TMS.OrderFreightRecord;
using BCDto.TMS.OrderSpecificServiceRecord;
using BCDto.TMS.OrderTranstionRecord;
using BCDto.TMS.TransportOrder;
using BCDto.TMS.VehicleIgnoreOrderAssignRecord;
using BCEntity.TMS.KanBan.AgentKanBan;
using BCEntity.TMS.Order.Order;
using BCEntity.TMS.Order.OrderAssignRecord;
using BCEntity.TMS.Order.OrderCancelRecord;
using BCEntity.TMS.Order.OrderEvaluation;
using BCEntity.TMS.Order.OrderExtention;
using BCEntity.TMS.Order.OrderMoveHouseSpecificationServiceRecord;
using BCEntity.TMS.Order.OrderPool;
using BCEntity.TMS.OrderExtentionGoodsChecklist;
using BCEntity.TMS.OrderFreightAppendRecord;
using BCEntity.TMS.OrderFreightFormulaRecord;
using BCEntity.TMS.OrderFreightRecord;
using BCEntity.TMS.OrderSpecificServiceRecord;
using BCEntity.TMS.OrderTranstionRecord;
using BCEntity.TMS.TransportOrder;
using BCEntity.TMS.VehicleIgnoreOrderAssignRecord;

namespace BCService.MapperProfiles.TMS
{
    public class OrderProfile : Profile
    {
        public OrderProfile()
        {
            //运输订单
            CreateMap<TransportOrderDto, TransportOrderEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TransportOrderRequestDto, TransportOrderPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TransportOrderRequestDto, TransportOrderEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TransportOrderPutDto, TransportOrderEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<TransportOrderEntity, TransportOrderDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            //订单池
            CreateMap<OrderPoolDto, OrderPoolEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderPoolEntity, OrderPoolDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderPoolEntity, OrderEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderEntity, OrderPoolEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderDto, OrderPoolDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderPoolDto, OrderDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //订单
            CreateMap<OrderDto, OrderEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderRequestDto, OrderEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderEntity, OrderDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<OrderEntity, OrderFreightFormulaRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            
            //订单扩展信息
            CreateMap<OrderExtentionDto, OrderExtentionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderExtentionRequestDto, OrderExtentionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderExtentionEntity, OrderExtentionDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<OrderShippingCostAddressRequestDto, OrderExtentionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderExtentionEntity, OrderShippingCostAddressRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<OrderGoodsBaseRequestDto, OrderExtentionEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderGoodsChecklistRequestDto, OrderShippingCostGoodsRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderGoodsChecklistRequestDto, OrderExtentionGoodsChecklistEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderCostChecklistDto, OrderFreightRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightRecordEntity, OrderCostChecklistDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //订单扩展货物清单信息
            CreateMap<OrderExtentionGoodsChecklistDto, OrderExtentionGoodsChecklistEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderExtentionGoodsChecklistRequestDto, OrderExtentionGoodsChecklistPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderExtentionGoodsChecklistRequestDto, OrderExtentionGoodsChecklistEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderExtentionGoodsChecklistPutDto, OrderExtentionGoodsChecklistEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderExtentionGoodsChecklistEntity, OrderExtentionGoodsChecklistDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            CreateMap<OrderExtentionGoodsChecklistEntity, OrderShippingCostGoodsRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            

            //订单特殊服务记录
            CreateMap<OrderSpecificServiceRecordDto, OrderSpecificServiceRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderSpecificServiceRecordRequestDto, OrderSpecificServiceRecordPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderSpecificServiceRecordRequestDto, OrderSpecificServiceRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderSpecificServiceRecordPutDto, OrderSpecificServiceRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderSpecificServiceRecordEntity, OrderSpecificServiceRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //订单搬家特殊服务记录
            CreateMap<OrderMoveHouseSpecificationServiceRecordDto, OrderMoveHouseSpecificationServiceRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderMoveHouseSpecificationServiceRecordRequestDto, OrderMoveHouseSpecificationServiceRecordPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderMoveHouseSpecificationServiceRecordRequestDto, OrderMoveHouseSpecificationServiceRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderMoveHouseSpecificationServiceRecordPutDto, OrderMoveHouseSpecificationServiceRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderMoveHouseSpecificationServiceRecordEntity, OrderMoveHouseSpecificationServiceRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //订单指派记录
            CreateMap<OrderAssignRecordEntity, OrderAssignRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //车辆忽略订单指派记录
            CreateMap<VehicleIgnoreOrderAssignRecordDto, VehicleIgnoreOrderAssignRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<VehicleIgnoreOrderAssignRecordRequestDto, VehicleIgnoreOrderAssignRecordPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<VehicleIgnoreOrderAssignRecordRequestDto, VehicleIgnoreOrderAssignRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<VehicleIgnoreOrderAssignRecordPutDto, VehicleIgnoreOrderAssignRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<VehicleIgnoreOrderAssignRecordEntity, VehicleIgnoreOrderAssignRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //订单运费公式记录
            CreateMap<OrderFreightFormulaRecordDto, OrderFreightFormulaRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightFormulaRecordRequestDto, OrderFreightFormulaRecordPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightFormulaRecordRequestDto, OrderFreightFormulaRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightFormulaRecordPutDto, OrderFreightFormulaRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightFormulaRecordEntity, OrderFreightFormulaRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();


            //订单流转记录
            CreateMap<OrderTranstionRecordDto, OrderTranstionRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderTranstionRecordRequestDto, OrderTranstionRecordPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderTranstionRecordRequestDto, OrderTranstionRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderTranstionRecordPutDto, OrderTranstionRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderTranstionRecordEntity, OrderTranstionRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //订单运费
            CreateMap<OrderFreightRecordDto, OrderFreightRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightRecordRequestDto, OrderFreightRecordPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightRecordRequestDto, OrderFreightRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightRecordPutDto, OrderFreightRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightRecordEntity, OrderFreightRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();


            //订单运费追加记录
            CreateMap<OrderFreightAppendRecordDto, OrderFreightAppendRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightAppendRecordRequestDto, OrderFreightAppendRecordPutDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightAppendRecordRequestDto, OrderFreightAppendRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightAppendRecordPutDto, OrderFreightAppendRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderFreightAppendRecordEntity, OrderFreightAppendRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

            //订单取消记录
            CreateMap<OrderCancelRequestDto, OrderEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderCancelRequestDto, OrderDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderCancelRecordDto, OrderCancelRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderCancelRecordPutDto, OrderCancelRecordEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderCancelRecordEntity, OrderCancelRecordDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            //订单评价
            CreateMap<OrderEvaluationDto, OrderEvaluationEntity>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderEvaluationEntity, OrderEvaluationDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            //订单统计
            CreateMap<OrderStatisticInfoEntity, OrderStatisticInfoDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderAreaAnalysisDetailEntity, OrderAreaAnalysisDetailDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();


            CreateMap<OrderBaseRequestDto, RunErrandsOrderRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();
            CreateMap<OrderBaseRequestDto, SmallPiecesOrderRequestDto>().IgnoreAllPropertiesWithAnInaccessibleSetter();

        }
    }
}